package main.com.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * @author lk
 * @date 2020/6/23 11:16
 * @description: 获取时间的工具
 */
public class DateUtil {

    /**
     * 获取当前时间
     *
     * @return
     */
    public static String getNowDate() {
        Calendar calendar = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String date = sdf.format(calendar.getTime());
        return date;
    }

}
